import request from '@/utils/request'
import store from '../store/index'
// 登录页面
export const loginAPI = data => request({
  url: '/v1_0/authorizations',
  method: 'POST',
  data
})
export const channelAPI = () => request({
  url: '/v1_0/user/channels',
  headers: {
    Authorization: 'Bearer ' + store.state.user.token
  }
})
export const MainlistAPI = params => request({
  url: '/v1_1/articles',
  params: {
    // 有一些固定的
    timestamp: (new Date()).getTime(),
    with_top: 1,
    ...params // 剩下的外面传入
  }
})
